package com.SmartCare.common.dto.attendance;

import com.SmartCare.common.dto.role.ElderlyDTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.SmartCare.pojo.role.User;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class AttendanceDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;
    /**
     * 访问者
     */
    private User visitor;
    /**
     * 老人
     */
    private ElderlyDTO elderly;
    /**
     * 签到时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime checkInTime;
    /**
     *签退时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime checkOutTime;

    /**
     * 签到状态
     */
    private Integer status;
    /**
     * 访问时长
     */
    private Long visitDuration;
    /**
     * 创建时间
     */
    private LocalDateTime createTime;

}
